package com.fei.httprequest;

import com.fei.test.HostProxy;

import http.HttpClientUtil;

public class ProxyRequest {
	public static void main(String[] args) {
		HostProxy hostProxy = new HostProxy("183.179.198.93", 3128);
        String hostname = hostProxy.getHostname();
        int port = hostProxy.getPort();

//        String url = "https://www.pornhub.com/";
        String url = "https://www.baidu.com/";
        // 切换HOST
        HttpClientUtil.reloadProxyConfig(hostname, port, "", "");
        String res  = HttpClientUtil.executeGet(url);
        
        System.out.println(res);
	}
}
